/*
	Licensed to the Apache Software Foundation (ASF) under one
	or more contributor license agreements.  See the NOTICE file
	distributed with this work for additional information
	regarding copyright ownership.  The ASF licenses this file
	to you under the Apache License, Version 2.0 (the
	"License"); you may not use this file except in compliance
	with the License.  You may obtain a copy of the License at
	
	http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing,
	software distributed under the License is distributed on an
	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
	KIND, either express or implied.  See the License for the
	specific language governing permissions and limitations
	under the License.
*/

//
//  rom.swift
//
//  Created by Michael Scott on 12/06/2015.
//  Copyright (c) 2015 Michael Scott. All rights reserved.
//

typealias Chunk = Int32
typealias DChunk = Int64

final public class ROM{
    
    static let CHUNK:Int=32
    
    /* Don't Modify from here... */
    static let NOT_SPECIAL=0
    static let PSEUDO_MERSENNE=1
    static let MONTGOMERY_FRIENDLY=2
    static let GENERALISED_MERSENNE=3
    static let WEIERSTRASS=0
    static let EDWARDS=1
    static let MONTGOMERY=2
    static let BN_CURVE=0
    static let BLS_CURVE=1

    /* ...to here */
    
/*** Enter Some Field details here  ***/
// BN254 Curve
//    static let MODBITS:UInt = 254 /* Number of bits in Modulus */
//    static let MOD8:UInt = 3   /* Modulus mod 8 */
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0
    
// BN454 Curve
//    static let MODBITS:UInt = 454 /* Number of bits in Modulus */
//    static let MOD8:UInt = 3   /* Modulus mod 8 */
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=128

// BLS383 Curve
  static let MODBITS:UInt = 383
  static let MOD8:UInt = 3
  static let BASEBITS:UInt = 28
  static let AES_S:UInt =  0
    
// BLS455 Curve
//    static let MODBITS:UInt = 455 /* Number of bits in Modulus */
//    static let MOD8:UInt = 3   /* Modulus mod 8 */
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=128
	
// HIFIVE Curve
//  static let MODBITS:UInt = 336
//  static let MOD8:UInt = 5
//  static let BASEBITS:UInt = 29
//  static let AES_S:UInt=128
        
// GOLDILOCKS
//	static let MODBITS:UInt=448
//	static let MOD8:UInt=7
//	static let BASEBITS:UInt=29
//	static let AES_S:UInt=0
    
// NIST384
//    static let MODBITS:UInt=384
//    static let MOD8:UInt=7
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0
   
// C41417
//    static let MODBITS:UInt=414
//    static let MOD8:UInt=7
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// NIST521
//    static let MODBITS:UInt=521
//    static let MOD8:UInt=7
//    static let BASEBITS:UInt=28
//    static let AES_S:UInt=0

// BN646
//    static let MODBITS:UInt=646
//    static let MOD8:UInt=3
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=192

// Curve 25519
//    static let MODBITS:UInt=255
//    static let MOD8:UInt=5
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// NIST256 or Brainpool
//    static let MODBITS:UInt=256
//    static let MOD8:UInt=7
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// MF254
//    static let MODBITS:UInt=254
//    static let MOD8:UInt=7
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// MS255
//    static let MODBITS:UInt = 255
//    static let MOD8:UInt = 3
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// MF256
//    static let MODBITS:UInt = 256
//    static let MOD8:UInt = 7
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// MS256
//    static let MODBITS:UInt = 256
//    static let MOD8:UInt = 3
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

// ANSSI
//    static let MODBITS:UInt = 256
//    static let MOD8:UInt = 3
//    static let BASEBITS:UInt=29
//    static let AES_S:UInt=0

    static let FFLEN:UInt=4
    
/* Don't Modify from here... */
    static let NLEN:Int=Int(1+((MODBITS-1)/BASEBITS))
    static let DNLEN:Int=2*NLEN
    static let BMASK:Chunk=((1<<Chunk(BASEBITS))-1)
    static let MODBYTES:UInt=(1+(MODBITS-1)/8)
    static let NEXCESS:Int = (1<<(CHUNK-Int(BASEBITS)-1))
    static let FEXCESS:Chunk = (1<<Chunk(BASEBITS*UInt(NLEN)-MODBITS));
    static let OMASK:Chunk=Chunk(-1)<<Chunk(MODBITS%BASEBITS)
    static let TBITS:UInt=MODBITS%BASEBITS; // Number of active bits in top word
    static let TMASK:Chunk=(1<<Chunk(TBITS))-1
    static let BIGBITS:UInt = (MODBYTES*8)
    static let HBITS = (BASEBITS/2)
    static let HMASK:Chunk = ((1<<Chunk(HBITS))-1)
    
   
    /* Finite field support - for RSA, DH etc. */
    static let FF_BITS:UInt=(BIGBITS*FFLEN) /* Finite Field Size in bits - must be BIGBITS.2^n */
    static let HFLEN=(FFLEN/2);  /* Useful for half-size RSA private key operations */
    
    static let P_MBITS:UInt=ROM.MODBYTES*8
    static let P_OMASK:Chunk=Chunk(-1)<<Chunk(P_MBITS%BASEBITS)
    static let P_FEXCESS:Chunk=(1<<Chunk(BASEBITS*UInt(NLEN)-P_MBITS))
    static let P_TBITS=(P_MBITS%ROM.BASEBITS)
    
/* ...to here */
    
// START SPECIFY FIELD DETAILS HERE
//*********************************************************************************
// Curve25519 Modulus
//    static let MODTYPE=PSEUDO_MERSENNE
//    static let Modulus:[Chunk]=[0x1FFFFFED,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF]
//    static let MConst:Chunk=19
    
// NIST-256 Modulus
//    static let MODTYPE=NOT_SPECIAL
//    static let Modulus:[Chunk]=[0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FF,0x0,0x0,0x40000,0x1FE00000,0xFFFFFF]
//    static let MConst:Chunk=1

// MF254 Modulus
//    static let MODTYPE=MONTGOMERY_FRIENDLY
//    static let Modulus:[Chunk]=[0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3F80FF]
//    static let MConst:Chunk=0x3F8100
// MS255 Modulus
//    static let MODTYPE = PSEUDO_MERSENNE
//    static let Modulus:[Chunk]=[0x1FFFFD03,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF]
//    static let MConst:Chunk=0x2FD
// MF256 Modulus
//    static let MODTYPE = MONTGOMERY_FRIENDLY
//    static let Modulus:[Chunk]=[0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFA7FF]
//    static let MConst:Chunk=0xFFA800
// MS256 Modulus
//    static let MODTYPE = PSEUDO_MERSENNE
//    static let Modulus:[Chunk]=[0x1FFFFF43,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFFFFF]
//    static let MConst:Chunk = 0xBD
// Brainpool Modulus
//    static let MODTYPE = NOT_SPECIAL
//    static let Modulus:[Chunk]=[0x1F6E5377,0x9A40E8,0x9880A08,0x17EC47AA,0x18D726E3,0x5484EC1,0x6F0F998,0x1B743DD5,0xA9FB57]
//    static let MConst:Chunk = 0xEFD89B9
// ANSSI Modulus
//    static let MODTYPE = NOT_SPECIAL
//    static let Modulus:[Chunk]=[0x186E9C03,0x7E79A9E,0x12329B7A,0x35B7957,0x435B396,0x16F46721,0x163C4049,0x1181675A,0xF1FD17]
//    static let MConst:Chunk = 0x164E1155
    
// HIFIVE Curve Modulus
//  static let MODTYPE = PSEUDO_MERSENNE
//  static let Modulus:[Chunk]=[0x1FFFFFFD,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFF]
//  static let MConst:Chunk = 0x3
    
// GOLDILOCKS Curve Modulus
//  static let MODTYPE = GENERALISED_MERSENNE
//  static let Modulus:[Chunk]=[0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FDFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFF]
//  static let MConst:Chunk = 0x1
    
// NIST384 Curve Modulus
//    static let MODTYPE = NOT_SPECIAL
//    static let Modulus:[Chunk]=[0x1FFFFFFF,0x7,0x0,0x1FFFFE00,0x1FFFEFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7F]
//    static let MConst:Chunk = 0x1
   
// C41417 Curve Modulus
//    static let MODTYPE = PSEUDO_MERSENNE
//    static let Modulus:[Chunk]=[0x1FFFFFEF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFF]
//    static let MConst:Chunk = 0x11
   
// NIST521 Curve Modulus
//    static let MODTYPE = PSEUDO_MERSENNE
//    static let Modulus:[Chunk]=[0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0x1FFFF]
//    static let MConst:Chunk = 0x1
  
// BN646 Curve Modulus
//    static let MODTYPE = NOT_SPECIAL
//    static let Modulus:[Chunk]=[0x404E013,0x1203604,0x4E0000,0x80A2084,0x2,0xC90420,0x4051078,0x3600001,0xA20660,0x36,0x5100900,0x10288468,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90]
//    static let MConst:Chunk = 0x15F615E5
    
// BNCX Curve Modulus
//   static let MODTYPE = NOT_SPECIAL
//   static let Modulus:[Chunk]=[0x1C1B55B3,0x13311F7A,0x24FB86F,0x1FADDC30,0x166D3243,0xFB23D31,0x836C2F7,0x10E05,0x240000]
//   static let MConst:Chunk=0x19789E85

// BN254 Curve Modulus
//   static let MODTYPE = NOT_SPECIAL
//   static let Modulus:[Chunk] = [0x13,0x18000000,0x4E9,0x2000000,0x8612,0x6C00000,0x6E8D1,0x10480000,0x252364]
//   static let MConst:Chunk=0x179435E5
    
// BLS383 Curve
    static let MODTYPE =  NOT_SPECIAL;
    static let Modulus:[Chunk] = [0xAAD556B,0xACAAB52,0x5F75D7A,0x1BB0147,0xD5D7520,0xCF73083,0xF99EB16,0x531820,0xA68EA32,0x2C01355,0x552A785,0x5C6105C,0x80A9F7,0x7AC52];
    static let MConst:Chunk=0x123D0BD;
    

// BN454 Curve Modulus
//   static let MODTYPE = NOT_SPECIAL
//   static let Modulus:[Chunk] = [0x13,0x270,0x2100,0x1C00D89C,0x25084,0xA284,0x24720,0x10803AA1,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]
//   static let MConst:Chunk=0x179435E5

// BLS455 Curve Modulus
 //  static let MODTYPE = NOT_SPECIAL
 //  static let Modulus:[Chunk] = [0x2AB,0x1500000C,0xAAA55AA,0xB12AAD6,0x6D1BA6C,0xCCA5674,0x12E2CF6E,0xA9F9662,0x34BD939,0x12D8EAB1,0xFD9978E,0x9240600,0xE0F95B,0xAAB9550,0x55555E5,0xAAAAB]
//   static let MConst:Chunk=0x1F4017FD

    // START SPECIFY CURVE DETAILS HERE
    //*********************************************************************************
    // Original Curve25519
    // 	static let CURVETYPE=MONTGOMERY
    //	static let CURVE_A:Int = 486662
    //	static let CURVE_B:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    //	static let CURVE_Order:[Chunk]=[0x1CF5D3ED,0x9318D2,0x1DE73596,0x1DF3BD45,0x14D,0x0,0x0,0x0,0x100000]
    //	static let CURVE_Gx:[Chunk]=[0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //	static let CURVE_Gy:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
// Ed25519 Curve
//    static let CURVETYPE=EDWARDS
//    static let CURVE_A:Int = -1
//    static let CURVE_B:[Chunk]=[0x135978A3,0xF5A6E50,0x10762ADD,0x149A82,0x1E898007,0x3CBBBC,0x19CE331D,0x1DC56DFF,0x52036C]
//    static let CURVE_Order:[Chunk]=[0x1CF5D3ED,0x9318D2,0x1DE73596,0x1DF3BD45,0x14D,0x0,0x0,0x0,0x100000]
//    static let CURVE_Gx:[Chunk]=[0xF25D51A,0xAB16B04,0x969ECB2,0x198EC12A,0xDC5C692,0x1118FEEB,0xFFB0293,0x1A79ADCA,0x216936]
//    static let CURVE_Gy:[Chunk]=[0x6666658,0x13333333,0x19999999,0xCCCCCCC,0x6666666,0x13333333,0x19999999,0xCCCCCCC,0x666666]
  
// HIFIVE Curve
//    	static let CURVETYPE=EDWARDS
//    	static let CURVE_A:Int = 1
//    	static let CURVE_Order:[Chunk]=[0x1E9FA805,0x197CACB9,0x1E4EEA9E,0x17AD70F,0x1FA9850C,0x38A0A,0x0,0x0,0x0,0x0,0x0,0x4000]
//    	static let CURVE_B:[Chunk] = [0x2B67,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
//    	static let CURVE_Gx:[Chunk] = [0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
//    	static let CURVE_Gy:[Chunk] = [0x5FE8632,0x15F63428,0xD976C4,0x1AACA194,0x35B6DB5,0x8E3F7A,0x52D1B0E,0xF0A7A36,0x1C161D00,0x8170C70,0x1185AD59,0x181B]
 
// GOLDILOCKS Curve
//    	static let CURVETYPE=EDWARDS
//    	static let CURVE_A:Int = 1
//    	static let CURVE_Order:[Chunk]=[0xB5844F3,0x1BC61495,0x1163D548,0x1984E51B,0x3690216,0xDA4D76B,0xFA7113B,0x1FEF9944,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FF]
//    	static let CURVE_B:[Chunk] = [0x1FFF6756,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FDFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFF]
//    	static let CURVE_Gx:[Chunk] = [0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0x152AAAAA,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x1555]
//    	static let CURVE_Gy:[Chunk] = [0xA9386ED,0x1757DE6F,0x13681AF6,0x19657DA3,0x3098BBB,0x12C19D15,0x12E03595,0xE515B18,0x17B7E36D,0x1AC426E,0xDBB5E8,0x10D8560,0x159D6205,0xB8246D9,0x17A58D2B,0x15C0]
    
// NIST384 Curve
//    static let CURVETYPE=WEIERSTRASS
//    static let CURVE_A:Int = -3
//    static let CURVE_Order:[Chunk]=[0xCC52973,0x760CB56,0xC29DEBB,0x141B6491,0x12DDF581,0x6C0FA1B,0x1FFF1D8D,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7F]
//    static let CURVE_B:[Chunk] = [0x13EC2AEF,0x142E476E,0xBB4674A,0xC731B14,0x1875AC65,0x447A809,0x4480C50,0xDDFD028,0x19181D9C,0x1F1FC168,0x623815A,0x47DCFC9,0x1312FA7E,0x59]
//    static let CURVE_Gx:[Chunk] = [0x12760AB7,0x12A2F1C3,0x154A5B0E,0x5E4BB7E,0x2A38550,0xF0412A,0xE6167DD,0xC5174F3,0x146E1D3B,0x1799056B,0x3AC71C7,0x1D160A6F,0x87CA22B,0x55]
//    static let CURVE_Gy:[Chunk] = [0x10EA0E5F,0x1218EBE4,0x1FA0675E,0x1639C3A,0xB8C00A6,0x1889DAF8,0x11F3A768,0x17A51342,0x9F8F41D,0x1C9496E1,0x1767A62F,0xC4C58DE,0x17DE4A9,0x1B]
  
// C41417 Curve
//    static let CURVETYPE=EDWARDS
//    static let CURVE_A:Int = 1
//    static let CURVE_Order:[Chunk]=[0x106AF79,0x18738D2F,0x18F3C606,0x1806715A,0x22B36F1,0xA67B830,0xCF32490,0x1FFFFFFD,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1F]
//    static let CURVE_B:[Chunk] = [0xE21,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
//    static let CURVE_Gx:[Chunk] = [0x13CBC595,0x7E9C097,0x14DF1931,0x14E7F550,0x1A111301,0x15A6B6B5,0xD526292,0x18FEAFFE,0x1F44C03E,0x1E6A31B4,0x70C9B97,0x43180C6,0x1443300,0x19A4828A,0x68]
//    static let CURVE_Gy:[Chunk] = [0x22,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
   
// NIST521 Curve
//    static let CURVETYPE=WEIERSTRASS
//    static let CURVE_A:Int = -3
//    static let CURVE_Order:[Chunk]=[0x1386409,0x6FB71E9,0xC47AEBB,0xC9B8899,0x5D03BB5,0x48F709A,0xB7FCC01,0xBF2F966,0x1868783,0xFFFFFA5,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0x1FFFF]
//    static let CURVE_B:[Chunk] = [0xB503F00,0x451FD46,0xC34F1EF,0xDF883D2,0xF073573,0xBD3BB1B,0xB1652C0,0xEC7E937,0x6193951,0xF109E15,0x489918E,0x15F3B8B,0x25B99B3,0xEEA2DA7,0xB68540,0x929A21A,0xE1C9A1F,0x3EB9618,0x5195]
//    static let CURVE_Gx:[Chunk] = [0x2E5BD66,0x7E7E31C,0xA429BF9,0xB3C1856,0x8DE3348,0x27A2FFA,0x8FE1DC1,0xEFE7592,0x14B5E77,0x4D3DBAA,0x8AF606B,0xB521F82,0x139053F,0x429C648,0x62395B4,0x9E3ECB6,0x404E9CD,0x8E06B70,0xC685]
//    static let CURVE_Gy:[Chunk] = [0xFD16650,0xBE94769,0x2C24088,0x7086A27,0x761353C,0x13FAD0,0xC550B9,0x5EF4264,0x7EE7299,0x3E662C9,0xFBD1727,0x446817A,0x449579B,0xD998F54,0x42C7D1B,0x5C8A5FB,0xA3BC004,0x296A789,0x11839]
    
// NIST-256 Curve
    //	static let CURVETYPE=WEIERSTRASS
    //    static let CURVE_A:Int = -3;
    //    static let CURVE_B:[Chunk]=[0x7D2604B,0x1E71E1F1,0x14EC3D8E,0x1A0D6198,0x86BC651,0x1EAABB4C,0xF9ECFAE,0x1B154752,0x5AC635]
    //    static let CURVE_Order:[Chunk]=[0x1C632551,0x1DCE5617,0x5E7A13C,0xDF55B4E,0x1FFFFBCE,0x1FFFFFFF,0x3FFFF,0x1FE00000,0xFFFFFF]
    //    static let CURVE_Gx:[Chunk]=[0x1898C296,0x509CA2E,0x1ACCE83D,0x6FB025B,0x40F2770,0x1372B1D2,0x91FE2F3,0x1E5C2588,0x6B17D1]
    //    static let CURVE_Gy:[Chunk]=[0x17BF51F5,0x1DB20341,0xC57B3B2,0x1C66AED6,0x19E162BC,0x15A53E07,0x1E6E3B9F,0x1C5FC34F,0x4FE342]

    // MF254 Modulus, Weierstrass Curve w-254-mont
    //    static let CURVETYPE=WEIERSTRASS
    //    static let CURVE_A:Int = -3
    //    static let CURVE_B:[Chunk]=[0x1FFFD08D,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3F80FF]
    //    static let CURVE_Order:[Chunk]=[0xF8DF83F,0x1D20CE25,0x8DD701B,0x317D41B,0x1FFFFEB8,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3F80FF]
    //    static let CURVE_Gx:[Chunk]=[0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //    static let CURVE_Gy:[Chunk]=[0x190D4EBC,0xB2EF9BF,0x14464C6B,0xE71C7F0,0x18AEBDFB,0xD3ADEBB,0x18052B85,0x1A6765CA,0x140E3F]
    
    // MF254 Modulus, Edwards Curve ed-254-mont
    //    static let CURVETYPE = EDWARDS
    //    static let CURVE_A:Int = -1
    //    static let CURVE_B:[Chunk]=[0x367B,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //    static let CURVE_Order:[Chunk]=[0x46E98C7,0x179E9FF6,0x158BEC3A,0xA60D917,0x1FFFFEB9,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFE03F]
    //    static let CURVE_Gx:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //    static let CURVE_Gy:[Chunk]=[0xF2701E5,0x29687ED,0xC84861F,0x535081C,0x3F4E363,0x6A811B,0xCD65474,0x121AD498,0x19F0E6]

    // MF254 Modulus, Montgomery Curve
    //static let CURVETYPE = MONTGOMERY
    //static let CURVE_A:Int = -55790;
    //static let CURVE_B:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    //static let CURVE_Order:[Chunk]=[0x46E98C7,0x179E9FF6,0x158BEC3A,0xA60D917,0x1FFFFEB9,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFE03F]
    //static let CURVE_Gx:[Chunk]=[0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
 
    // MS255 Modulus, Weierstrass Curve
    //static let CURVETYPE = WEIERSTRASS
    //static let CURVE_A:Int = -3
    //static let CURVE_B:[Chunk]=[0x1FFFAB46,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF]
    //static let CURVE_Order:[Chunk]=[0x1C594AEB,0x1C7D64C1,0x14ACF7EA,0x14705075,0x1FFFF864,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF]
    //static let CURVE_Gx:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x9CB44BA,0x199FFB3B,0x1F698345,0xD8F19BB,0x17D177DB,0x1FFCD97F,0xCE487A,0x181DB74F,0x6F7A6A]

    // MS255 Modulus, Edwards Curve
    //static let CURVETYPE = EDWARDS
    //static let CURVE_A:Int = -1
    //static let CURVE_B:[Chunk]=[0xEA97,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Order:[Chunk]=[0x436EB75,0x24E8F68,0x9A0CBAB,0x34F0BDB,0x1FFFFDCF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFF]
    //static let CURVE_Gx:[Chunk]=[0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x108736A0,0x11512ADE,0x1116916E,0x29715DA,0x47E5529,0x66EC706,0x1517B095,0xA694F76,0x26CB78]

    // MS255 Modulus, Montgomery Curve
    //static let CURVETYPE=MONTGOMERY
    //static let CURVE_A:Int = -240222
    //static let CURVE_B:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    //static let CURVE_Order:[Chunk]=[0x436EB75,0x24E8F68,0x9A0CBAB,0x34F0BDB,0x1FFFFDCF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFF]
    //static let CURVE_Gx:[Chunk]=[0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    
    // MF256 Modulus, Weierstrass Curve
    //static let CURVETYPE = WEIERSTRASS
    //static let CURVE_A:Int = -3;
    //static let CURVE_B:[Chunk]=[0x14E6A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Order:[Chunk]=[0x79857EB,0x8862F0D,0x1941D2E7,0x2EA27CD,0x1FFFFFC5,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFA7FF]
    //static let CURVE_Gx:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0xB724D2A,0x3CAA61,0x5371984,0x128FD71B,0x1AE28956,0x1D13091E,0x339EEAE,0x10F7C301,0x20887C]
    
    // MF256, Edwards Curve
    //static let CURVETYPE = EDWARDS
    //static let CURVE_A:Int = -1
    //static let CURVE_B:[Chunk]=[0x350A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Order:[Chunk]=[0x18EC7BAB,0x16C976F6,0x19CCF259,0x9775F70,0x1FFFFB15,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FE9FF]
    //static let CURVE_Gx:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x12F3C908,0xF553917,0x1FA9A35F,0xBCC91B,0x1AACA0C,0x1779ED96,0x156BABAF,0x1F1F1989,0xDAD8D4]
   
    // MF256 Modulus, Montgomery Curve
    //static let CURVETYPE = MONTGOMERY
    //static let CURVE_A:Int = -54314
    //static let CURVE_B:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    //static let CURVE_Order:[Chunk]=[0x18EC7BAB,0x16C976F6,0x19CCF259,0x9775F70,0x1FFFFB15,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FE9FF]
    //static let CURVE_Gx:[Chunk]=[0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used

    // MS256, Weierstrass Curve
    //static let CURVETYPE  = WEIERSTRASS
    //static let CURVE_A:Int = -3
    //static let CURVE_B:[Chunk]=[0x25581,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Order:[Chunk]=[0x751A825,0x559014A,0x9971808,0x1904EBD4,0x1FFFFE43,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFFFFF]
    //static let CURVE_Gx:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x2B56C77,0x1FA31836,0x253B042,0x185F26EB,0xDD6BD02,0x4B66777,0x1B5FF20B,0xA783C8C,0x696F18]

    // MS256, Edwards Curve
    //static let CURVETYPE = EDWARDS
    //static let CURVE_A:Int = -1;
    //static let CURVE_B:[Chunk]=[0x3BEE,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Order:[Chunk]=[0x1122B4AD,0xDC27378,0x9AF1939,0x154AB5A1,0x1FFFFBE6,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FFFFF]
    //static let CURVE_Gx:[Chunk]=[0xD,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x131CADBA,0x3FB7DA9,0x134C0FDC,0x14DAC704,0x46BFBE2,0x1859CFD0,0x1B6E8F4C,0x3C5424E,0x7D0AB4]

    // MS256 Modulus, Montgomery Curve
    //static let CURVETYPE = MONTGOMERY
    //static let CURVE_A:Int = -61370
    //static let CURVE_B:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    //static let CURVE_Order:[Chunk]=[0x1122B4AD,0xDC27378,0x9AF1939,0x154AB5A1,0x1FFFFBE6,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FFFFF]
    //static let CURVE_Gx:[Chunk]=[0xb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    //static let CURVE_Gy:[Chunk]=[0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0] // not used
    
    // Brainpool
    //static let CURVETYPE = WEIERSTRASS
    //static let CURVE_A:Int = -3
    //static let CURVE_B:[Chunk]=[0x1EE92B04,0x172C080F,0xBD2495A,0x7D7895E,0x176B7BF9,0x13B99E85,0x1A93F99A,0x18861B09,0x662C61]
    //static let CURVE_Order:[Chunk]=[0x174856A7,0xF07414,0x1869BDE4,0x12F5476A,0x18D718C3,0x5484EC1,0x6F0F998,0x1B743DD5,0xA9FB57]
    //static let CURVE_Gx:[Chunk]=[0xE1305F4,0xD0C8AB1,0xBEF0ADE,0x28588F5,0x16149AFA,0x9D91D32,0x1EDDCC88,0x79839FC,0xA3E8EB]
    //static let CURVE_Gy:[Chunk]=[0x1B25C9BE,0xD5F479A,0x1409C007,0x196DBC73,0x417E69B,0x1170A322,0x15B5FDEC,0x10468738,0x2D996C]
    
    // ANSSI
    //static let CURVETYPE = WEIERSTRASS
    //static let CURVE_A:Int = -3;
    //static let CURVE_B:[Chunk]=[0x1B7BB73F,0x3AF6CB3,0xC68600C,0x181935C9,0xC00FDFE,0x1D3AA522,0x4C0352A,0x194A8515,0xEE353F]
    //static let CURVE_Order:[Chunk]=[0x6D655E1,0x1FEEA2CE,0x14AFE507,0x18CFC281,0x435B53D,0x16F46721,0x163C4049,0x1181675A,0xF1FD17]
    //static let CURVE_Gx:[Chunk]=[0x198F5CFF,0x64BD16E,0x62DC059,0xFA5B95F,0x23958C2,0x1EA3A4EA,0x7ACC460,0x186AD827,0xB6B3D4]
    //static let CURVE_Gy:[Chunk]=[0x14062CFB,0x188AD0AA,0x19327860,0x3860FD1,0xEF8C270,0x18F879F6,0x12447E49,0x1EF91640,0x6142E0]


    // BN254 Curve
/*
    static let CURVETYPE = WEIERSTRASS
    static let CURVE_PAIRING_TYPE = BN_CURVE
    static let CURVE_A:Int = 0
    static let CURVE_B:[Chunk]=[0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cof:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Order:[Chunk]=[0xD,0x8000000,0x428,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364]
    static let CURVE_Bnx:[Chunk]=[0x1,0x4000000,0x10,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cru:[Chunk]=[0x7,0xC000000,0x1B3,0x12000000,0x2490,0x11200000,0x126CD,0x0,0x0]
    static let CURVE_Fra:[Chunk]=[0xF2A6DE9,0xBEF3603,0xFDDF0B8,0x12E9249A,0x953F850,0xDA85423,0x1232D926,0x32425CF,0x1B3776]
    static let CURVE_Frb:[Chunk]=[0x10D5922A,0xC10C9FC,0x10221431,0xF16DB65,0x16AC8DC1,0x1917ABDC,0xDD40FAA,0xD23DA30,0x9EBEE]
    static let CURVE_Pxa:[Chunk]=[0x803FB2B,0xF721126,0x62FC364,0x9177691,0x1EDB6A46,0x63F4630,0x18BFAE36,0x176A33D6,0x61A10]
    static let CURVE_Pxb:[Chunk]=[0x7D54CF3,0xC61A60F,0xDE12DC3,0x1AE8D75C,0xAA5B1F4,0x13C62CC1,0xCCC42A,0x1F374E6F,0x516AA]
    static let CURVE_Pya:[Chunk]=[0x11CD2B9A,0xF8703C4,0xF826F46,0x1A15CD7B,0x822329B,0x104B34C6,0xD0E6A43,0x140D75F2,0x21897]
    static let CURVE_Pyb:[Chunk]=[0xB3ACE9B,0x1168D763,0xE7255E2,0xDFFAE,0x18D37B09,0x22B7AF9,0x149A3DB5,0x1CF9162,0xEBB2B]
    static let CURVE_Gx:[Chunk]=[0x12,0x18000000,0x4E9,0x2000000,0x8612,0x6C00000,0x6E8D1,0x10480000,0x252364]
    static let CURVE_Gy:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_W:[[Chunk]]=[[0x3,0x0,0x81,0x3000000,0x618,0x0,0x0,0x0,0x0],[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0]]
    static let CURVE_SB:[[[Chunk]]]=[[[0x4,0x8000000,0xA1,0x3000000,0x618,0x0,0x0,0x0,0x0],[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0xA,0x8000000,0x3A7,0x1C000000,0x79E1,0x6C00000,0x6E8D1,0x10480000,0x252364]]]
    static let CURVE_WB:[[Chunk]]=[[0x0,0x4000000,0x10,0x1000000,0x208,0x0,0x0,0x0,0x0],[0x5,0x14000000,0x152,0xE000000,0x1C70,0xC00000,0xC489,0x0,0x0],[0x3,0xC000000,0xB1,0x7000000,0xE38,0x10600000,0x6244,0x0,0x0],[0x1,0xC000000,0x30,0x1000000,0x208,0x0,0x0,0x0,0x0]]
    static let CURVE_BB:[[[Chunk]]]=[[[0xD,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364],[0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364],[0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364],[0x2,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364],[0xD,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364],[0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364]],[[0x2,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x2,0x4000000,0x10,0x0,0x0,0x0,0x0,0x0,0x0],[0x2,0x10000000,0x40,0x0,0x0,0x0,0x0,0x0,0x0],[0xA,0x0,0x408,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364],[0x2,0x4000000,0x10,0x0,0x0,0x0,0x0,0x0,0x0]]]

    static let USE_GLV = true
    static let USE_GS_G2 = true
    static let USE_GS_GT = true
    static let GT_STRONG = false
*/

    // BLS383 Curve
    
    static let CURVETYPE = WEIERSTRASS;
    static let CURVE_PAIRING_TYPE = BLS_CURVE;
    static let CURVE_A:Int = 0;
    
    static let CURVE_Order:[Chunk]=[0xFFF001,0xFFF8000,0xFE7800,0xBFDE007,0xC5EDF1C,0x3000049,0x910007A,0xC40007F,0x641004C,0x14,0x0,0x0,0x0,0x0];
    static let CURVE_B:[Chunk]=[0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0];
    static let CURVE_Cof:[Chunk]=[0x52B,0x2A00,0xAAB2CA0,0x5560AAA,0x6055,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0];
    static let CURVE_Gx:[Chunk]=[0xD10786B,0xD59B348,0x3F54AD0,0x3477C0E,0x4578B9B,0xBF25B73,0x7BB6F65,0x4F6AC00,0xFF57E9C,0xEFD5830,0xFB6EC02,0xADB9F88,0xEE4BC98,0xB08C];
    static let CURVE_Gy:[Chunk]=[0xD145DDB,0x5DA023,0x5FEF7CC,0x13F518C,0x2B2A66F,0x56EC346,0xC7A925F,0x96F3019,0x981223E,0x9061047,0x8F5BE59,0x4810AD,0x9337671,0x1F390];
    
    static let CURVE_Bnx:[Chunk]=[0x40,0x100,0x110,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0];
    static let CURVE_Cru:[Chunk]=[0xDA155A9,0xA3AAC4E,0x61E5E3D,0xDF2FE87,0xE632625,0xBCDFAAD,0xD3035A6,0x5123128,0xBEAD683,0xDBF3A2B,0x424190,0x5C5FAB2,0x80A9F7,0x7AC52];
    static let CURVE_Fra:[Chunk]=[0x2B4508B,0x2BA59A9,0x6EEF343,0x63DB7A0,0x1DFBC74,0x40341CB,0x32D55D3,0x1639E9D,0x5CC36D4,0xB19B3F0,0xD86AB98,0xF323EE4,0xB198672,0x5A5F];
    static let CURVE_Frb:[Chunk]=[0x7F904E0,0x81051A9,0xF086A37,0xB7D49A6,0xB7DB8AB,0x8F3EEB8,0xC6C9543,0xEEF7983,0x49CB35D,0x7A65F65,0x7CBFBEC,0x693D177,0x5672384,0x751F2];
    static let CURVE_Pxa:[Chunk]=[0xBAC9472,0x6059885,0xE2DC36D,0x7C4D31D,0x8C88A7,0xBDC90C3,0x1C688FC,0x29F0197,0xC43F167,0x3693539,0x61EB8BF,0xD81E5A5,0x22B56BF,0x4D507];
    static let CURVE_Pxb:[Chunk]=[0x272AB23,0x9B4BD7A,0xF44DCE8,0x7AF19D4,0x3206A34,0x3F6F7B9,0x2A819FB,0x571DD3E,0x635D7EE,0x3A2BA3B,0xC1A126,0xAC28C78,0x17C3E5B,0xEE36];
    static let CURVE_Pya:[Chunk]=[0x77BD4FD,0x81D2309,0xDFDFC6,0xB66072,0xC89A0C,0x41FC959,0x878287A,0x2E1FBCF,0x14EEE65,0x11C230,0x6BB325E,0x2887881,0x859A05C,0x8F40];
    static let CURVE_Pyb:[Chunk]=[0x52C4CE6,0xA5E20A2,0xAFF40C8,0x5907A74,0x2448EF3,0x41760A4,0xFDA199,0xFFEF82B,0x8D4EA49,0xA0F29A1,0x6E4997B,0xAC7F7B8,0xBA88C12,0x1DCAB];
    
    static let CURVE_W:[[Chunk]]=[[],[]];
    static let CURVE_SB:[[[Chunk]]]=[[[],[]],[[],[]]];
    static let CURVE_WB:[[Chunk]]=[[],[],[],[]];
    static let CURVE_BB:[[[Chunk]]]=[[[],[],[],[]],[[],[],[],[]],[[],[],[],[]],[[],[],[],[]]];
    
    static let USE_GLV = true
    static let USE_GS_G2 = true
    static let USE_GS_GT = true
    static let GT_STRONG = false
    
    // BN454 Curve
/*
    static let CURVETYPE = WEIERSTRASS
    static let CURVE_PAIRING_TYPE = BN_CURVE
    static let CURVE_A:Int = 0

    static let CURVE_Order:[Chunk]=[0xD,0x210,0x1F80,0x400D884,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]
    static let CURVE_B:[Chunk]=[0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cof:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Gx:[Chunk]=[0x12,0x270,0x2100,0x1C00D89C,0x25084,0xA284,0x24720,0x10803AA1,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]
    static let CURVE_Gy:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]

    static let CURVE_Bnx:[Chunk]=[0x1,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cru:[Chunk]=[0x7,0xD8,0x900,0x16002436,0x481,0x1B24,0x168,0x48006C9,0x1600006C,0x10000091,0xD80000D,0x240000,0x0,0x0,0x0,0x0]
    static let CURVE_Fra:[Chunk]=[0x1573B0EC,0x1816E4FE,0xA42E6E0,0x15DDCD87,0x2B17EC7,0x35B9A50,0x15AA1F74,0x1B7B2AC5,0x1CB5A200,0x9937657,0x17389A4A,0x738BADB,0xD92B321,0x3F5F0E6,0x1B1C9E9A,0x25CF3]
    static let CURVE_Frb:[Chunk]=[0xA8C4F27,0x7E91D71,0x15BD3A1F,0x6230B14,0x1D50D1BD,0x1CA50833,0xA5827AB,0x15050FDB,0x74B3887,0x166C9A92,0x19C78A3C,0x199F4886,0x1B6D4F39,0x80A0F61,0x7236169,0x2230C]
    static let CURVE_Pxa:[Chunk]=[0xF02B14,0x1DD1DD61,0x330AEC7,0x178617DE,0x1CEFFF36,0x116D35AF,0x1F879FBF,0x105DBF83,0x8345436,0x13664BCA,0x12EE86B5,0x776BB31,0x14AAFE16,0x41B3478,0x13E03554,0x2807A]
    static let CURVE_Pxb:[Chunk]=[0x45BF266,0xE036876,0x8F0DBA,0xCB5976F,0x10DBC523,0x1723123C,0xBDDA7F4,0x10077CDE,0x11971DE0,0x14F1554A,0x195995EE,0x82E6FD7,0x40D5258,0x1400A58F,0x15A7850B,0x2B2A5]
    static let CURVE_Pya:[Chunk]=[0x1E1B15C7,0x9CD5B5D,0x1571B2D2,0x1E4C048A,0x1474FB5D,0x18E2328C,0x11775519,0x144EF51F,0xF2FAABA,0x438F741,0x1930EAC0,0x144DC38,0x1287A0FE,0x36D8962,0x10011EAF,0x3ACF4]
    static let CURVE_Pyb:[Chunk]=[0x571D60,0x8737DB,0xC4A363B,0x124E308F,0x13A65C7E,0x1387693A,0x10CDDA2F,0x184C096E,0x385175,0x5A34088,0xF17A93C,0x1E194915,0x1903ED91,0x4D6FA9F,0x8D8210B,0x12EDC]
    static let CURVE_W:[[Chunk]]=[[0x3,0x40,0x180,0x10000010,0xC0,0x6,0x10000018,0xC00001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]
    static let CURVE_SB:[[[Chunk]]]=[[[0x4,0x50,0x180,0x14000014,0xC0,0x6,0x10000018,0xC00001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0xA,0x1D0,0x1E00,0x1400D874,0x24F03,0xA278,0x246F0,0xF003A9E,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]]]
    static let CURVE_WB:[[Chunk]]=[[0x0,0x8,0x80,0x2000002,0x40,0x2,0x10000008,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x5,0xA8,0x700,0xA00182A,0x381,0x121C,0x100,0x3800487,0x4000048,0x61,0x9000009,0x180000,0x0,0x0,0x0,0x0],[0x3,0x58,0x380,0x16000C16,0x1C0,0x90E,0x10000080,0x1C00243,0x12000024,0x10000030,0x4800004,0xC0000,0x0,0x0,0x0,0x0],[0x1,0x18,0x80,0x6000006,0x40,0x2,0x10000008,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]
    static let CURVE_BB:[[[Chunk]]]=[[[0xD,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0x2,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xD,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]],[[0x2,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x2,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2,0x20,0x0,0x8000008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0xA,0x200,0x1F80,0xD880,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0x2,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]]

    static let USE_GLV = true
    static let USE_GS_G2 = true
    static let USE_GS_GT = true
    static let GT_STRONG = false
*/
    // BLS455 Curve
/*
    static let CURVETYPE = WEIERSTRASS
    static let CURVE_PAIRING_TYPE = BLS_CURVE
    static let CURVE_A:Int = 0

    static let CURVE_Order:[Chunk]=[0x1FC00001,0x3FFF,0x10000070,0x1400000,0x1D100,0xF0003A8,0x13C0009,0x1E200,0x180002E0,0x400001,0x4000,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_B:[Chunk]=[0xA,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cof:[Chunk]=[0xABFFAAB,0x14AABFFD,0xD52AADA,0x1562AAAB,0x15556AAA,0x2A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Gx:[Chunk]=[0x1DFCEDD1,0x16A62EEF,0xE80D3ED,0xB8DE876,0x179C7253,0x182DAB52,0x46CC85F,0x1E571D9C,0x1E8392B1,0x1A155867,0x19E6527C,0x23DC64E,0xABEDA59,0xF20662B,0x17CECC01,0x310A]
    static let CURVE_Gy:[Chunk]=[0x6619B9B,0x27EBCD,0x1BE80A19,0x13B014BA,0x191A4936,0x13911916,0x107A5A3B,0x1DCB0863,0x1F5FB1,0xDE44A9C,0x18E23B2A,0x1FA81FD3,0xB0D6DFA,0xC2FE1EF,0xDDFA7E2,0x3351B]

    static let CURVE_Bnx:[Chunk]=[0x800,0x1000004,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cru:[Chunk]=[0xAA9,0x9017FE0,0x128DD8AA,0x1F4A321E,0x148FEC90,0x195CDEEA,0xE961AA2,0x168D3B66,0xAFD99D7,0xB989AA6,0x1F9A5724,0x91A05FF,0xE0EF5B,0xAAB9548,0x55555E5,0xAAAAB]
    static let CURVE_Fra:[Chunk]=[0xA2EBF21,0x4E67DEE,0xCDE6590,0xE5EA94E,0x15454985,0x140CFC43,0x7E14D1C,0x1778395A,0x1944F022,0x166BEA1A,0xC3DEEA0,0x9F031A0,0x16A7459,0x1F1D6E00,0x125CFB72,0x72FD4]
    static let CURVE_Frb:[Chunk]=[0x15D1438A,0x1019821D,0x1DCBF01A,0x1CB40187,0x118C70E6,0x18BD5A30,0xB018251,0x13275D08,0xA06E916,0x1C6D0096,0x39BA8ED,0x1F33D460,0x1F768501,0xB8E274F,0x12F85A72,0x37AD6]
    static let CURVE_Pxa:[Chunk]=[0x10C1F542,0x23AF907,0x159F840,0xBAC0E1F,0x133D7766,0x1C034C5D,0x14C5C875,0x1ED0BDA2,0x16A49C71,0x1E9FF62D,0x14F3ACC0,0x1E0C9FEA,0xC4638DE,0x74D18DA,0xBEA0030,0x5D962]
    static let CURVE_Pxb:[Chunk]=[0x749F03D,0xC843773,0xB17BCBA,0x1134AB4B,0x8EA016E,0x1A0D766C,0x58F819E,0x48A1FCC,0xE296F62,0x83370E4,0xC9BA1D5,0x1E43290E,0xEE59A80,0x1FDD85F5,0x1F3819B6,0x1D9F]
    static let CURVE_Pya:[Chunk]=[0x181A77F4,0x191AD22,0x1E9F842A,0x1E1E6CF6,0xD55B9D9,0x1D062533,0x15BB1323,0x7ECBC1,0x1A9EC2EF,0x1EE14CE0,0x1E96B271,0xA794439,0x1C544324,0xE6AD5DC,0x16429B0F,0x448E3]
    static let CURVE_Pyb:[Chunk]=[0x1E1FDBA2,0x1A09DB6C,0xF680D5B,0xFCC6122,0xC488E2A,0x1E489ECD,0x1005617E,0x1CF9EC36,0x1C89ED72,0x16C00D90,0x1563E595,0x1243DDC0,0x8698F9E,0x1BD81E7E,0xF2A0F4A,0x66A0]

// Not used
//    static let CURVE_W:[[Chunk]]=[[0x3,0x40,0x180,0x10000010,0xC0,0x6,0x10000018,0xC00001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]
//    static let CURVE_SB:[[[Chunk]]]=[[[0x4,0x50,0x180,0x14000014,0xC0,0x6,0x10000018,0xC00001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0xA,0x1D0,0x1E00,0x1400D874,0x24F03,0xA278,0x246F0,0xF003A9E,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]]]
//    static let CURVE_WB:[[Chunk]]=[[0x0,0x8,0x80,0x2000002,0x40,0x2,0x10000008,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x5,0xA8,0x700,0xA00182A,0x381,0x121C,0x100,0x3800487,0x4000048,0x61,0x9000009,0x180000,0x0,0x0,0x0,0x0],[0x3,0x58,0x380,0x16000C16,0x1C0,0x90E,0x10000080,0x1C00243,0x12000024,0x10000030,0x4800004,0xC0000,0x0,0x0,0x0,0x0],[0x1,0x18,0x80,0x6000006,0x40,0x2,0x10000008,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]
//    static let CURVE_BB:[[[Chunk]]]=[[[0xD,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0x2,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xD,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000]],[[0x2,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x2,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2,0x20,0x0,0x8000008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0xA,0x200,0x1F80,0xD880,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000],[0x2,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]]

    static let CURVE_W:[[Chunk]]=[[],[]]
    static let CURVE_SB:[[[Chunk]]]=[[[],[]],[[],[]]]
    static let CURVE_WB:[[Chunk]]=[[],[],[],[]]
    static let CURVE_BB:[[[Chunk]]]=[[[],[],[],[]],[[],[],[],[]],[[],[],[],[]],[[],[],[],[]]]


    static let USE_GLV = true
    static let USE_GS_G2 = true
    static let USE_GS_GT = true
    static let GT_STRONG = false
*/
    // BNCX Curve
 /*
    static let CURVETYPE = WEIERSTRASS
    static let CURVE_PAIRING_TYPE = BN_CURVE
    static let CURVE_A:Int = 0
    static let CURVE_B:[Chunk]=[0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cof:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Order:[Chunk]=[0x16EB1F6D,0x108E0531,0x1241B3AF,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000]
    static let CURVE_Bnx:[Chunk]=[0x3C012B1,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cru:[Chunk]=[0x14235C97,0xF0498BC,0x1BE1D58C,0x1BBEC8E3,0x3F1440B,0x654,0x12000,0x0,0x0]
    static let CURVE_Fra:[Chunk]=[0x15C80EA3,0x1EC8419A,0x1CFE0856,0xEE64DE2,0x11898686,0x5C55653,0x592BF86,0x5F4C740,0x135908]
    static let CURVE_Frb:[Chunk]=[0x6534710,0x1468DDE0,0x551B018,0x10C78E4D,0x4E3ABBD,0x9ECE6DE,0x2A40371,0x1A0C46C5,0x10A6F7]
    static let CURVE_Pxa:[Chunk]=[0x4D2EC74,0x428E777,0xF89C9B0,0x190B7F40,0x14BBB907,0x12807AE1,0x958D62C,0x58E0A76,0x19682D]
    static let CURVE_Pxb:[Chunk]=[0xE29CFE1,0x1D2C7459,0x270C3D1,0x172F6184,0x19743F81,0x49BD474,0x192A8047,0x1D87C33E,0x1466B9]
    static let CURVE_Pya:[Chunk]=[0xF0BE09F,0x7DFE75E,0x1FB06CC3,0x3667B08,0xE209636,0x110ABED7,0xE376078,0x1B2E4665,0xA79ED]
    static let CURVE_Pyb:[Chunk]=[0x898EE9D,0xC825914,0x14BB7AFB,0xC9D4AD3,0x13461C28,0x122896C6,0x240D71B,0x73D9898,0x6160C]
    static let CURVE_Gx:[Chunk]=[0x1C1B55B2,0x13311F7A,0x24FB86F,0x1FADDC30,0x166D3243,0xFB23D31,0x836C2F7,0x10E05,0x240000]
    static let CURVE_Gy:[Chunk]=[0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_W:[[Chunk]]=[[0x162FEB83,0x2A31A48,0x100E0480,0x16,0x600,0x0,0x0,0x0,0x0],[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0]]

    
    static let CURVE_SB:[[[Chunk]]]=[[[0x1DB010E4,0x2A31A48,0x100E04A0,0x16,0x600,0x0,0x0,0x0,0x0],[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0xBB33EA,0xDEAEAE9,0x233AF2F,0x1FADDC03,0x166D2643,0xFB23D31,0x836C2F7,0x10E05,0x240000]]]
    
    static let CURVE_WB:[[Chunk]]=[[0x167A84B0,0xE108C2,0x1004AC10,0x7,0x200,0x0,0x0,0x0,0x0],[0x1E220475,0x166FCCAD,0x129FE68D,0x1D29DB51,0x2A0DC07,0x438,0xC000,0x0,0x0],[0xF10B93,0x1B37E657,0x194FF34E,0x1E94EDA8,0x1506E03,0x21C,0x6000,0x0,0x0],[0x1DFAAA11,0xE108C2,0x1004AC30,0x7,0x200,0x0,0x0,0x0,0x0]]
    
    static let CURVE_BB:[[[Chunk]]]=[[[0x132B0CBD,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000],[0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000],[0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000],[0x7802562,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000],[0x132B0CBD,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000],[0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000]],[[0x7802562,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0],[0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x3C012B2,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0],[0xF004AC2,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0],[0xF6AFA0A,0x108E0531,0x1241B38F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000],[0x3C012B2,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0]]]
    
    static let USE_GLV = true
    static let USE_GS_G2 = true
    static let USE_GS_GT = true
    static let GT_STRONG = true
*/
    
// BN646 Curve
/*
    static let CURVETYPE=WEIERSTRASS
    static let CURVE_PAIRING_TYPE = BN_CURVE
    static let CURVE_A:Int = 0
    static let CURVE_Order:[Chunk]=[0x1E04200D,0x1203603,0x420000,0x80A207E,0x2,0xC303F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90]
    static let CURVE_B:[Chunk] = [0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cof:[Chunk] = [0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Gx:[Chunk] = [0x404E012,0x1203604,0x4E0000,0x80A2084,0x2,0xC90420,0x4051078,0x3600001,0xA20660,0x36,0x5100900,0x10288468,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90]
    static let CURVE_Gy:[Chunk] = [0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    
    static let CURVE_Bnx:[Chunk]=[0x1001,0x0,0x10000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Cru:[Chunk]=[0x401B007,0x901,0x1B0000,0x1B024,0x0,0x288120,0xD812,0x900000,0x1B0120,0x0,0xD80000,0x6C048,0x0,0x6C0000,0x0,0x0,0x120000,0x0,0x0,0x0,0x0,0x0,0x0]
    static let CURVE_Fra:[Chunk]=[0x4929A14,0x3B756CA,0x4337DD0,0xFC1417C,0x193166BB,0x1DC54515,0x1C0DF653,0x19BF8961,0x155980E,0x1983CB14,0x4D76309,0x1DEAB1A4,0xF9C3CF5,0x128FEC2D,0x867E339,0xDA0548A,0x1A480AF,0xA3CBCD2,0x116DA6E0,0x2A546E9,0x789577C,0x1F9459D2,0x27]
    static let CURVE_Frb:[Chunk]=[0x1F7245FF,0x1D68DF39,0x1C1A822F,0x1848DF07,0x6CE9946,0x303BF0A,0x7F71A24,0x9A0769F,0x1F4C6E51,0x67C3521,0x38A5F6,0x123DD2C4,0x1063C317,0xFF825D2,0x17981E76,0x125FAB75,0x1EC78CD0,0x15C34375,0xE92591F,0x1D5ABD96,0x1876A883,0x6BA62D,0x68]
    static let CURVE_Pxa:[Chunk]=[0x1CCC5E10,0x119F939,0xC6C7FE9,0x81022FF,0x6486AA6,0x1CBC560B,0x1F707429,0xC82F7B9,0x1A7F5CDA,0x14C0EB47,0x11412373,0x13DAF21E,0x126BE416,0x166744A7,0x506E81,0x1048FFA3,0x13A6B0C9,0x1A90979A,0xE78C338,0x1722C561,0xBFFF9A1,0xC1AF83C,0x3F]
    static let CURVE_Pxb:[Chunk]=[0x67F4BC0,0x1BFC3C9,0x1E9DC3B6,0x87E2B03,0xB820274,0x1DD03B1E,0x517C463,0x1EFCBBC9,0x19F786A8,0x5572E90,0xD0BA5E0,0x16E8A40A,0x1013CF3B,0x11A7F82B,0x1C27B302,0x15E7CD12,0xB79A6DF,0x1EC6895B,0x5775A7E,0xBB28D24,0x416A171,0x127D284E,0x5D]
    static let CURVE_Pya:[Chunk]=[0xC3FB414,0x2B868EE,0xD858793,0x157FCFE,0x16C849AD,0x1D17B0A4,0x1353CFEA,0x940A061,0x1CEF834E,0x7BE766A,0x4584C1C,0xE2397E9,0x418E9D4,0x8F53B8,0x53B37E0,0x11CA29D9,0xE425654,0x9EFF9AF,0x18CF27A1,0x17755A26,0x3F5481A,0x6C531BC,0x1E]
    static let CURVE_Pyb:[Chunk]=[0x133908AD,0x17F1F1ED,0x14196532,0x19A85214,0x173EC3F7,0x1021EC2C,0xD798A3E,0x18F4C857,0x82EE2FA,0x11B5296D,0x1831D9C6,0x4463DB5,0x11B4812C,0xF93B884,0xC72653,0xEC6F6ED,0x916CFFF,0x1E81ED0A,0x1103518E,0x1E478B01,0x6B01074,0xC46CCAA,0x48]
 
    static let CURVE_W:[[Chunk]]=[[0x6008003,0x0,0x80000,0x6,0x0,0x40030,0x3,0x0,0x30,0x0,0x0,0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]
    
    static let CURVE_SB:[[[Chunk]]]=[[[0x600A004,0x0,0xA0000,0x6,0x0,0x50030,0x3,0x0,0x30,0x0,0x0,0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1803A00A,0x1203603,0x3A0000,0x80A2078,0x2,0xBF03C0,0x4051072,0x3600001,0xA20600,0x36,0x5100900,0x10288450,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90]]]
    
    static let CURVE_WB:[[Chunk]]=[[0x2001000,0x0,0x10000,0x2,0x0,0x8010,0x1,0x0,0x10,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1C015005,0x600,0x150000,0x1201C,0x0,0x1C80E0,0x900E,0x600000,0x1200E0,0x0,0x900000,0x48038,0x0,0x480000,0x0,0x0,0xC0000,0x0,0x0,0x0,0x0,0x0,0x0],[0xE00B003,0x300,0xB0000,0x900E,0x0,0xE8070,0x4807,0x300000,0x90070,0x0,0x480000,0x2401C,0x0,0x240000,0x0,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0],[0x2003001,0x0,0x30000,0x2,0x0,0x18010,0x1,0x0,0x10,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]
    
    static let CURVE_BB:[[[Chunk]]]=[[[0x1E04100D,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90],[0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90],[0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90],[0x2002,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90],[0x1E04100D,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90],[0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90]],[[0x2002,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]],[[0x1002,0x0,0x10000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x4002,0x0,0x40000,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0],[0x1E04000A,0x1203603,0x400000,0x80A207E,0x2,0xC203F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90],[0x1002,0x0,0x10000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0]]]
    
    
    static let USE_GLV = true
    static let USE_GS_G2 = true
    static let USE_GS_GT = true
    static let GT_STRONG = false
*/  
}

